#include "trap.h"
   .set noat
   .globl main
   .text
main:

    ori $s0, 0xffff                 # $s0 = 0x0000ffff

    ori $s1, 0xffff                 
    lui $s1, 0x1111                 # $s1 = 0x11110000

    li $t0, 0x10101010
    li $t1, 0x01011111
    and $s3, $t0, $t1               # $s3 = 0x00001010

    li $t0, 0xfffffff6
    andi $s4, $t0, 0xfff9           # $s4 = 0x0000fff0

    li $t0, 0x007f6e00
    lui $t1, 0xfedc
    nor $s5, $t0, $t1               # $s5 = 0x010091ff

    ori $t1, 0xf600
    or $s6, $t0, $t1                # $s6 = 0x007ffe00

    xor $s7, $t0, $t1               # $s7 = 0x007f9800

    xori $a0, $t0, 0x9e67           # $a0 = 0x007ff067

    li $t0, 0xfffffff6
    li $t1, 0x7
    li $t2, 0x0
    sllv $a1, $t0, $t1              # $a1 = 0xfffffb00
    sllv $a2, $t0, $t2              # $a2 = 0xfffffff6

    sll $a3, $t0, 0x8               # $a3 = 0xfffff600
    
    li $t0, 0x007f6e00
    li $t1, 0x10
    srav $v0, $t0, $t1              # $v0 = 0x0000007f

    li $t0, 0xffffffda
    sra $v1, $t0, 0x2               # $v1 = 0xfffffff6

    lui $t0, 0xfedc
    li $t1, 0x9
    srlv $k0, $t0, $t1              # $k0 = 0x007f6e00

    li $t0, 0x007ffe00
    srl $k1, $t0, 0x9               # $k1 = 0x000003fff
    srl $s2, $k1, 0x0               # $s2 = 0x000003fff

   ####结果计算####
    and $s0, $s0, $s1
    or $s0, $s0, $s2
    and $s0, $s0, $s3
    or $s0, $s0, $s4
    and $s0, $s0, $s5
    or $s0, $s0, $s6
    and $s0, $s0, $s7
    or $s0, $s0, $a0
    and $s0, $s0, $a1
    or $s0, $s0, $a2
    and $s0, $s0, $a3
    or $s0, $s0, $v0
    and $s0, $s0, $v1
    or $s0, $s0, $k0
    and $s0, $s0, $k1
    #### $s0 = 0x007f7fff ####

    HIT_GOOD_TRAP